
		
*======================================================= APPENDIX TABLES  =========================================================*

**-------------------------------------------------
** Table A.1 
**------------------------------------------------

		// Matched Sample 
		use "$repfinaldata/matchedloans_finalsample.dta", clear
		* Keep the key variables 
		keep LoanId TransId ImportParcelId hmda_loan_id OriginalLoanAmount OriginalPropertyValue OriginalLTV CLTV OriginalTerm OriginalInterestRate OriginalCreditScore DTIHousingRatio hmda_app_income
		*Fix the formating and units of variables
		//replace hmda_app_income = hmda_app_income * 1000 
		replace OriginalLTV = OriginalLTV * 100
		replace OriginalInterestRate = OriginalInterestRate * 100 
		replace OriginalLoanAmount = OriginalLoanAmount / 1000 
		replace OriginalPropertyValue = OriginalPropertyValue / 1000 
		replace OriginalCreditScore = . if OriginalCreditScore==0 
		cd "$repoutput"
		outreg2 using  mergediagnostics, replace sum(log) dta ///
			eqkeep(N mean sd) keep(OriginalLoanAmount OriginalPropertyValue OriginalLTV ///
			CLTV OriginalTerm OriginalInterestRate OriginalCreditScore DTIHousingRatio hmda_app_income)

		// CRISM 
		use $mergediagnostics/crism_allyears, clear 
		keep if Purpose ==1  // purchase mortgages
		keep if (PropertyTypeId==1) // single-family homes 
		*drop outliers 
		foreach var in OriginalLTV OriginalLoanAmount OriginalPropertyValue OriginalInterestRate OriginalCreditScore DTI CLTV { 
			sum `var',d
			gen outlier_`var' =1 if `var'<r(p1) | `var'> r(p99)
		} 
		drop if outlier_OriginalLTV == 1 | outlier_OriginalPropertyValue==1 | outlier_OriginalLoanAmount==1 	
		keep OriginalLoanAmount OriginalPropertyValue OriginalLTV CLTV OriginalTerm OriginalInterestRate OriginalCreditScore DTIH 
		replace OriginalLTV = OriginalLTV * 100
		replace OriginalInterestRate = OriginalInterestRate * 100 
		replace OriginalLoanAmount = OriginalLoanAmount  / 1000 
		replace OriginalPropertyValue = OriginalPropertyValue / 1000
		cd "$repoutput"
		outreg2 using  mergediagnostics, append dta sum(log) ///
			eqkeep(N mean sd) keep(OriginalLoanAmount OriginalPropertyValue OriginalLTV CLTV OriginalTerm OriginalInterestRate OriginalCreditScore DTIHousingRatio)


		// Ztrax		
		use "$mergediagnostics/z_allyears_2.dta", clear 
		keep TransId LoanAmount SalesPriceAmount ztrax_term FIPS PropertyUseStndCode
		duplicates drop 
		
		*drop outliers 
		sum SalesPriceAmount,d
		gen outlier_SalesPriceAmount =1 if SalesPriceAmount<r(p1) | SalesPriceAmount> r(p99)
		drop if outlier_SalesPriceAmount == 1 
		sum LoanAmount,d
		gen outlier_Loan =1 if LoanAmount<r(p1) | LoanAmount> r(p99)
		drop if outlier_Loan == 1 
		keep if Property=="SR" | mi(Property) | Property=="RR" // single-family homes 
	
		*renaming variables to match CRISM
		gen OriginalLoanAmount = LoanAmount
		gen OriginalPropertyValue = SalesPriceAmount 
		gen OriginalTerm = ztrax_term 
		keep OriginalLoanAmount OriginalPropertyValue OriginalTerm 
		
		*reformating 
		replace OriginalLoanAmount = OriginalLoanAmount / 1000 
		replace OriginalPropertyValue = OriginalPropertyValue / 1000 
		cd "$repoutput"
		outreg2 using  mergediagnostics, append dta sum(log) ///
			eqkeep(N mean sd) keep(OriginalLoanAmount OriginalPropertyValue OriginalTerm  )
	

		// HMDA 
		use "$mergediagnostics/hmda_allyears.dta", clear  
		drop if Denied==1
		keep if property_type == "1"
		keep if loan_purpose=="1" 
		drop if mi(app_income)
		destring(year), replace 
		drop if year<2010 
		*drop outliers 
		gen loan_amt_dollars = loan_amt 
		summ loan_amt_dollars, d
		gen outlier_loan =1 if loan_amt_dollars<r(p1) | loan_amt_dollars> r(p99)
		drop if outlier_loan == 1 
		gen hmda_app_income = app_income 
		summ hmda_app_income, d
		 gen outlier_income = 1 if hmda_app_income < r(p1) | hmda_app_income > r(p1)
		 gen OriginalLoanAmount = loan_amt_dollars 
		 count
		 local hmda_count: di %9.0fc r(N)
		 cd "$repoutput"
		outreg2 using  mergediagnostics, append dta sum(log) ///
			eqkeep(N mean sd) keep(OriginalLoanAmount hmda_app_income )

				
				

**-------------------------------------------------
** Table A.2
**------------------------------------------------
	
	use "$repfinaldata/matchedloans_finalsample.dta", clear 

	global loan_long OriginalLoanAmount DTIHousingRatio SecondHome LowGrade FHA_VA FullDocument JumboAtOriginationFlag r2 rs_BuildingAreaSqFt I_r2
	*format variables 
	replace OriginalLoanAmount = OriginalLoanAmount / 1000 
	replace SecondHome = SecondHome * 100 
	replace LowGrade = LowGrade * 100 
	replace FHA_VA = FHA_VA * 100 
	replace FullDocument = FullDocument* 100 
	replace JumboAtOriginationFlag = JumboAtOriginationFlag * 100 
	replace r2 = r2 / 1000 
	replace I_r2 = I_r2 * 100 
	
	est drop _all
	eststo: estpost summ $loan_long if I_SHFA==1 
	local loan_shfa_N: di %9.0fc e(N) 
	eststo: estpost summ $loan_long if I_SHFA==0  
	local loan_noshfa_N: di %9.0fc e(N) 
	
	esttab  using "$repoutput/summstats_appendix.txt", tex replace ///
		cells("mean(fmt(a2)) sd(fmt(a2))") ///
		mtitle("FloodZone" "NonFloodZone" ) ///
		nodepvars nonumbers label frag noobs ///
		postfoot("Observations &\multicolumn{2}{c}{`loan_shfa_N'} & \multicolumn{2}{c}{`loan_noshfa_N'} \\")
	

*-------------------------------------------------------
* TABLE A.3 
*-------------------------------------------------------

	use "$repfinaldata/matchedloans_finalsample.dta", clear 
	replace OriginalCreditScore = . if I_mi_CreditScore
	collapse (mean) HMDA_denialrate HMDA_shdenied_downpayment SHFA_share hmda_app_income OriginalPropertyValue OriginalCreditScore, by(FIPS ZIP year) 
	egen fezip = group(FIPS ZIP)
	gen log_hmda_income = log(hmda_app_income)
	gen log_propertyvalue = log(OriginalPropertyValue)
	

	label var HMDA_denialrate "Denial Rates"
	label var HMDA_shdenied_downpayment "Share Denied Due to Downpayment"
	label var SHFA_share "Flood Zone Share"
	
	est drop _all 
	eststo: reghdfe HMDA_denialrate SHFA_share, absorb(fezip year) cl(FIPS)
	estadd local zipFE "Y"
	estadd local yearFE "Y"
	estadd local control "N"
	eststo: reghdfe HMDA_denialrate SHFA_share log_hmda_income log_propertyvalue OriginalCreditScore, absorb(fezip year) cl(FIPS)
	estadd local zipFE "Y"
	estadd local yearFE "Y"
	estadd local control "Y"
	eststo: reghdfe HMDA_shdenied_downpayment SHFA_share, absorb(fezip year) cl(FIPS)
	estadd local zipFE "Y"
	estadd local yearFE "Y"
	estadd local control "N"
	eststo: reghdfe HMDA_shdenied_downpayment SHFA_share log_hmda_income log_propertyvalue OriginalCreditScore, absorb(fezip year) cl(FIPS)
	estadd local zipFE "Y"
	estadd local yearFE "Y"
	estadd local control "Y"


	esttab using "$repoutput/denialrates.txt", b(4) se(4) ar2(2) replace  ///
		star(* 0.10 ** 0.05 *** 0.01) /// 
		keep(SHFA_share) ///
		stats(r2_a zipFE yearFE control N, label("Adjusted R-Squared" "Zip FE" "Year FE" "Controls" "Observations") fmt(%9.4f %9.0fc)) 
			

**--------------------------------------------------------------------------------------------------------------------
** TABLE A.4 
**-----------------------------------------------------------------------------------------------------------------

	use "$repfinaldata/matchedloans_finalsample.dta", clear 
	est drop _all
	replace OriginalCreditScore = . if I_mi_Credit==1 
	
	eststo: reg OriginalInterestRate log_hmda_income log_OriginalPropertyValue OriginalCreditScore DTIHousingRatio OriginalLTV  if I_SHFA==0, cl(FIPS) 
	
	label var OriginalInterestRate "Interest Rate"
	label var log_hmda_income "Log Income"
	label var log_OriginalPropertyValue "Log Property Value"
	label var OriginalCreditScore "Credit Score"
	label var DTIHousingRatio "Debt-to-Income"
	label var OriginalLTV "LTV"
	
	
	esttab using "$repoutput/rate_benchmarking.txt", ///
		se(4) b(4) ar2(2) ///
		star(* 0.10 ** 0.05 *** 0.01) label ///
		replace 
	
**--------------------------------------------------------------------------------------------------------------------
** TABLE A.5
**--------------------------------------------------------------------------------------		

	use "$repfinaldata/hmda_2018_points.dta", replace 
	
	summ hmda_interest_rate if I_SHFA==0 
	local mean_rate = `r(mean)' * 100
	local mean_rate : display %9.2f `mean_rate'
 
	summ points if I_SHFA==0 
	local mean_points = `r(mean)' * 100
	local mean_points : display %9.2f `mean_points'
	
	est drop _all 

	eststo: reg hmda_interest_rate I_SHFA,  cl(ztrax_FIPS)
	estadd local controls = "N"
	estadd local zipFE = "N"
	eststo: reg hmda_interest_rate I_SHFA  log_property log_income hmda_DTI,  cl(ztrax_FIPS)
	estadd local controls = "Y"
	estadd local zipFE = "N"
	eststo: reghdfe hmda_interest_rate I_SHFA  log_property log_income , absorb(ztrax_ZIP) cl(ztrax_FIPS)
	estadd local controls = "Y"
	estadd local zipFE = "Y"
	
	esttab est1 est2 est3 using "$repoutput/points_regression_results_rates.txt", se ar2 ///
		label keep(I_SHFA) replace  ///
		postfoot("Mean rate outside floodzone: `mean_rate' ") ///
		stats(r2_a controls zipFE N)
		
	
	
	eststo: reg points I_SHFA,  cl(ztrax_FIPS)
	estadd local controls = "N"
	estadd local zipFE = "N"
	eststo: reg points I_SHFA  log_property log_income hmda_DTI,  cl(ztrax_FIPS)
	estadd local controls = "Y"
	estadd local zipFE = "N"
	eststo: reghdfe points I_SHFA  log_property log_income , absorb(ztrax_ZIP) cl(ztrax_FIPS)
	estadd local controls = "Y"
	estadd local zipFE = "Y"
	
	esttab est4 est5 est6 using  "$repoutput/points_regression_results_points.txt", se ar2 ///
		label keep(I_SHFA) replace ///
		postfoot("Mean points outside floodzone : `mean_points' ") ///
		stats(r2_a controls zipFE N)

	

**-------------------------------------------------	
** TABLE A.6 
**----------------------------------------------------	
	
	use "$repfinaldata/matchedloans_finalsample.dta", clear 

	est drop _all
	eststo: reg log_hmda_income I_r2 I_SHFA_final FloodZone_x_CapBinds, cl(FIPS)
	estadd local zipyearFE = "N"
	eststo: reghdfe log_hmda_income I_r2 I_SHFA_final FloodZone_x_CapBinds, absorb(fegroup) cl(FIPS)
	estadd local zipyearFE = "Y"
	eststo: reg OriginalCreditScore I_r2 I_SHFA_final FloodZone_x_CapBinds, cl(FIPS)
	estadd local zipyearFE = "N"
	eststo: reghdfe OriginalCreditScore I_r2 I_SHFA_final FloodZone_x_CapBinds, absorb(fegroup) cl(FIPS)
	estadd local zipyearFE = "Y"
	
	esttab using "$repoutput/income_cap_badcontrols.txt", se ar2 /// 	
		keep(I_r2 I_SHFA_final FloodZone_x_CapBinds) ///
		star(* 0.10 ** 0.05 *** 0.01) ///
		interaction(" $\times$ ")  ///
		stats(r2_a N zipyearFE, label("Adjusted R-Squared" "Observations") fmt(%9.4f %9.0fc)) ///
		label replace 
		
	

**---------------------------------------------------
** Table A.7
**---------------------------------------------------

	use "$repfinaldata/matchedloans_finalsample.dta", clear 
	
	label var I_r2 "CapBinds"
	label var I_SHFA_final "FloodZone"

	est drop _all 
	eststo: reghdfe OriginalLTV I_r2 I_SHFA_final FloodZone_x_CapBinds   if I_gse==0 & I_othergov==0, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "private"

	eststo: reghdfe OriginalLTV I_r2 I_SHFA_final FloodZone_x_CapBinds  $controls_ltv if I_gse==0 & I_othergov==0, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "Y"
	estadd local sample "private"
	
	eststo: reghdfe OriginalLTV I_r2 I_SHFA_final FloodZone_x_CapBinds   if I_gse==1, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "gse"
	
	eststo: reghdfe OriginalLTV I_r2 I_SHFA_final FloodZone_x_CapBinds  $controls_ltv if I_gse==1, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "Y"
	estadd local sample "gse"
		


	esttab using "$repoutput/screening_aroundcap_gse.txt",  replace ///
		se ar2 varwidth(50) ///
		star(* 0.10 ** 0.05 *** 0.01) ///
		keep(I_r2 I_SHFA_final FloodZone_x_CapBinds) ///
		stats(r2_a FE Controls N sample, label("Adjusted R-Squared" "Zip-Year FE" "Controls" "Observations" "Sample") fmt(%9.4f %9.0fc))



**--------------------------------------------------------------------------------------------------------------------
** Appendix Table A.8 
**-----------------------------------------------------------------------------------------------------------------
	
	use "$repfinaldata/matchedloans_finalsample.dta", clear 
	
	
	* Tablenotes
	global se_note = "Standard errors in parentheses, clustered at the county level."
	global star_note = "* p $<$ 0.10, ** p $<$ 0.05, *** p $<$ 0.01"

	label var OriginalLTV "LTV"
	label var OriginalInterestRate "Interest Rate"
	label var I_SHFA_final "FloodZone"
	label var I_r2 "CapBinds" 
	label var FloodZone_x_CapBinds "CapBinds $\times$ FloodZone"

	** Main Table
	est drop _all 

	*generate LTV shares 
	gen I_ltv70 = OriginalLTV < .7
	gen I_ltv70_80 = OriginalLTV>=.7 & OriginalLTV <.8
	gen I_ltv80_95 = OriginalLTV >= .8 & OriginalLTV < .95
	gen I_ltv95 = OriginalLTV >= .95 

	
	// Panel A:  No Controls, No FE 
	
	eststo: reg I_ltv70 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS) 
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
	
	eststo: reg I_ltv70_80 I_r2 I_SHFA_final FloodZone_x_CapBinds, cl(FIPS) 
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
	
	eststo: reg I_ltv80_95 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS) 
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
	
	eststo: reg I_ltv95 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS) 
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
		
	//Panel B: No Controls,  Full FE 
	
	
	eststo: reghdfe I_ltv70 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS)  absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
	
	eststo: reghdfe I_ltv70_80 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
	
	eststo: reghdfe I_ltv80_95 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"
	
	eststo: reghdfe I_ltv95 I_r2 I_SHFA_final FloodZone_x_CapBinds , cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "N"
	estadd local sample "Full"


	// Pancel C: Full Controls,  Full FE 
	
	
	eststo: reghdfe I_ltv70 I_r2 I_SHFA_final FloodZone_x_CapBinds  $controls_ltv, cl(FIPS)  absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "Y"
	estadd local sample "Full"
	
	eststo: reghdfe I_ltv70_80 I_r2 I_SHFA_final FloodZone_x_CapBinds  $controls_ltv, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "Y"
	estadd local sample "Full"
	
	eststo: reghdfe I_ltv80_95 I_r2 I_SHFA_final FloodZone_x_CapBinds $controls_ltv, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "Y"
	estadd local sample "Full"
	
	eststo: reghdfe I_ltv95 I_r2 I_SHFA_final FloodZone_x_CapBinds $controls_ltv, cl(FIPS) absorb(fegroup)
	estadd local FE "Y"
	estadd local Controls "Y"
	estadd local sample "Full"

	*Panel A
	esttab est1 est2 est3 est4 using "$repoutput/screening_aroundcap_ltvshare_1.txt", se ar2  ///
		keep(I_r2 I_SHFA_final FloodZone_x_CapBinds) ///
		star(* 0.10 ** 0.05 *** 0.01) ///
		interaction(" $\times$ ")  ///
		stats(r2_a FE Controls N, ///
			label("Adjusted R-Squared" "Zip-Year FE" "Controls" "Observations") fmt(%9.4f %9.0fc)) ///
		nomtitle nodepvar nonumbers nonotes nolines ///
 		label replace frag 

	*Panel B		
	esttab est5 est6 est7 est8  using "$repoutput/screening_aroundcap_ltvshare_2.txt", se ar2  ///
		keep(I_r2 I_SHFA_final FloodZone_x_CapBinds) ///
		star(* 0.10 ** 0.05 *** 0.01) ///
		interaction(" $\times$ ")  ///
		stats(r2_a FE Controls N, ///
			label("Adjusted R-Squared" "Zip-Year FE" "Controls" "Observations") fmt(%9.4f %9.0fc)) ///
		nomtitle nodepvar nonumbers nonotes nolines ///
 		label replace frag 
	
	*Panel C
	esttab est9 est10 est11 est12 using "$repoutput/screening_aroundcap_ltvshare_3.txt", se ar2  ///
		keep(I_r2 I_SHFA_final FloodZone_x_CapBinds) ///
		star(* 0.10 ** 0.05 *** 0.01) ///
		interaction(" $\times$ ")  ///
		stats(r2_a FE Controls N, ///
			label("Adjusted R-Squared" "Zip-Year FE" "Controls" "Observations") fmt(%9.4f %9.0fc)) ///
		nomtitle nodepvar nonumbers nonotes nolines ///
 		label replace frag 
		

**--------------------------------------------------------------------------------------------------------------------
** Appendix Table A.9  
**-----------------------------------------------------------------------------------------------------------------		
	use $repfinaldata/eventstudy_parcel_FL13, clear 

	est drop _all
	eststo: reghdfe OriginalInterestRate Post if fz_grew3==1 | noremap2==1, absorb(county year) cl(county)
	estadd local CountyFE "Y"
	estadd local YearFE "Y"
	eststo: reghdfe I_del Post if fz_grew3==1 | noremap2==1, absorb(county year) cl(county)
	estadd local CountyFE "Y"
	estadd local YearFE "Y"
	eststo: reghdfe DTI Post if fz_grew3==1 | noremap2==1, absorb(county year) cl(county)
	estadd local CountyFE "Y"
	estadd local YearFE "Y"
	eststo: reghdfe OriginalTerm Post if fz_grew3==1 | noremap2==1, absorb(county year) cl(county)
	estadd local CountyFE "Y"
	estadd local YearFE "Y"
	eststo: reghdfe dollar_per_sqfoot Post if fz_grew3==1 | noremap2==1, absorb(county year) cl(county)
	estadd local CountyFE "Y"
	estadd local YearFE "Y"
	
	esttab using $repoutput/remapping_post_noremap.txt, se(4) b(4) ar2(2) ///
		drop(_cons) replace ///
		star(* 0.10 ** 0.05 *** 0.01) ///
		stats(r2_a CountyFE YearFE N, label("Adjusted R-Squared" "County FE" "Year FE" "Observations") fmt(%9.2f %9.0fc)) ///
		label varwidth(25) nonotes ///
		title("Pooled Effect of Updated Maps on Mortgages: Robustness to Including Never-Treated Groups") 

			
**--------------------------------------------------------------------------------------------------------------------
** Appendix Table A.10
**-----------------------------------------------------------------------------------------------------------------

	use $repfinaldata/eventstudy_parcel_FL13, clear 

	*rename nfip_takeup takeup_overall
	rename takeup_all takeup_overall 
	collapse (mean) takeup_overall  openfema_lapserate difference3, by(Post ZIP FIPS)
	reshape wide takeup_overall openfema_lapse, i(FIPS ZIP) j(Post)
	gen takeup_diff = takeup_overall1 - takeup_overall0
	gen lapse_diff = openfema_lapserate1 - openfema_lapserate0 

	est drop _all
	eststo: reg takeup_diff difference3, cl(FIPS)
	eststo: reg lapse_diff difference3, cl(FIPS)

	label var difference3 "$\Delta FloodZoneShare_z$"
	label var takeup_diff "$\Delta TakeupRates_z$"
	label var lapse_diff "$\Delta LapseRates_z$"
	
	esttab using $repoutput/takeup.txt, b(4) se(4) ar2(2) ///
		star(* 0.10 ** 0.05 *** 0.01) label ///
		replace nonotes nomtitle nonumber substitute(\_ _)
		
	
	
**--------------------------------------------------------------------------------------------------------------------
** Appendix Table A.11 
**-----------------------------------------------------------------------------------------------------------------
	use "$repfinaldata/matchedloans_finalsample.dta", clear 
	
	label var nfip_takeup "NFIP Takeup"
	label var OriginalLTV "LTV"

	est drop _all 
	
	*inside flood zones 
	eststo: reg nfip_takeup OriginalLTV if I_SHFA==1, cl(FIPS)
	estadd local controls "N"
	estadd local FE "N"
	eststo: reghdfe nfip_takeup OriginalLTV if I_SHFA==1, absorb(ZIP year) cl(FIPS)
	estadd local controls "N"
	estadd local FE "Y"
	eststo: reghdfe nfip_takeup OriginalLTV log_hmda_income OriginalCreditScore I_mi_Cr if I_SHFA==1, absorb(ZIP year) cl(FIPS) 
	estadd local controls "Y"
	estadd local FE "Y"
	
	*outside flood zones 
	eststo: reg nfip_takeup OriginalLTV if I_SHFA==0, cl(FIPS)
	estadd local controls "N"
	estadd local FE "N"
	eststo: reghdfe nfip_takeup OriginalLTV if I_SHFA==0, absorb(ZIP year) cl(FIPS)
	estadd local controls "N"
	estadd local FE "Y"
	eststo: reghdfe nfip_takeup OriginalLTV log_hmda_income OriginalCreditScore I_mi_Cr if I_SHFA==0, absorb(ZIP year) cl(FIPS) 
	estadd local controls "Y"
	estadd local FE "Y"
	
	esttab using $repoutput/ltv_nfip_relationship.txt, se(4) b(4) ar2(2) ///
		star(* 0.10 ** 0.05 *** 0.01) keep(OriginalLTV) ///
		stats(r2_a FE FE controls N, ///
			label("Adjusted R-Squared" "Zip FE" "Year FE" "Controls" "Observations") fmt(%9.4f %9.0fc)) 
		
		
**--------------------------------------------------------------------------------------------------------------------
** TABLE A.12
**-----------------------------------------------------------------------------------------------------------------
	
		use "$repfinaldata/hmda_event_study.dta", clear 
		keep if !mi(Denied) & !mi(Denied_downpayment) & !mi(DTI)
		label var Post2 "Post"
		label var above_cap "LoanGt250K"
				
		est drop _all 
		eststo: reghdfe Denied Post##above_cap if fz_grew4==1, absorb(county year) cl(county) 
		estadd local SamplePeriod = "Full"
		estadd local CountyFE "Y"
		estadd local YearFE "Y"
		estadd local Control "N"
		estadd local LoanAmountControls "Y" 
		eststo: reghdfe Denied Post##above_cap DTI if fz_grew4==1, absorb(county year) cl(county) 
		estadd local SamplePeriod = "Full"
		estadd local CountyFE "Y"
		estadd local YearFE "Y"
		estadd local Control "Y"
		estadd local LoanAmountControls "Y" 
		eststo: reghdfe Denied_downpayment Post##above_cap if fz_grew4==1, absorb(county year) cl(county)
		estadd local SamplePeriod = "Full"
		estadd local CountyFE "Y"
		estadd local YearFE "Y"
		estadd local Control "N"
		estadd local LoanAmountControls "Y" 
		eststo: reghdfe Denied_downpayment Post##above_cap DTI if fz_grew4==1, absorb(county year) cl(county)
		estadd local SamplePeriod = "Full"
		estadd local CountyFE "Y"
		estadd local YearFE "Y"
		estadd local Control "Y"
		estadd local LoanAmountControls "Y" 
		
		esttab using "$repoutput/remapping_post_denial_cap.txt", se ar2 replace ///
			keep(1.Post2 1.Post2#1.above_cap) ///
			star(* 0.10 ** 0.05 *** 0.01)  ///
			stats(r2_a N CountyFE YearFE Control LoanAmountControls, ///
			label("Adjusted R-Squared" "Observations" "County FE" "Year FE" "Controls" "Loan Amount Controls") fmt(%9.4f %9.0fc)) ///
			label 
		
**--------------------------------------------------------------------------------------------------------------------			
** TABLE A.13			
**--------------------------------------------------------------------------------------------------------------------			
		use "$repfinaldata/hmda_event_study.dta", clear 
		label var Post2 "Post"
		label var above_cap "LoanGt250K"

		est drop _all 

		keep if !mi(Denied) & !mi(Denied_downpayment) & !mi(DTI)
			
		est drop _all 
		eststo: reghdfe log_loan 1.Post if fz_grew4==1 & Denied==1, absorb(county year) cl(county) 
		estadd local SamplePeriod = "Denied"
		estadd local CountyFE "Y"
		estadd local YearFE "Y"
	
		eststo: reghdfe DTI 1.Post if fz_grew4==1 & Denied==1, absorb(county year) cl(county) 
		estadd local SamplePeriod = "Denied"
		estadd local CountyFE "Y"
		estadd local YearFE "Y"
	
		esttab using "$repoutput/remapping_post_deniedloans.txt", se ar2 replace ///
			keep(1.Post2) ///
			star(* 0.10 ** 0.05 *** 0.01)  ///
			stats(r2_a N CountyFE YearFE , ///
			label("Adjusted R-Squared" "Observations" "County FE" "Year FE" "Controls") fmt(%9.4f %9.0fc)) ///
			label 
			
	



*----------------------------------------------------------------------
* TABLE A.14 
*----------------------------------------------------------------

	use "$repfinaldata/isaac_delinquency_panel.dta", clear 
	keep if inrange(CurrentMonth, tm(2011m8), tm(2013m8)) //1Y before or after storm 
	gen post_isaac = CurrentMonth >= tm(2012m8) // isaac 
	gen low_ltv = OriginalLTV < .9 

	est drop _all 
	eststo: reg I_delinq i.post_isaac if Isaac_hit==1, cl(zip5)
	estadd local FE "Y"
	eststo: reg I_delinq i.post_isaac##i.low_ltv if Isaac_hit==1, cl(zip5)
	estadd local FE "Y"
	eststo: reg I_delinq i.post_isaac##i.low_ltv##i.remapped_preisaac if Isaac_hit==1, cl(zip5)
	estadd local FE "Y"

	label var I_delinq "Delinquent (Y/N)"
	label var post_isaac "Post Isaac"
	label var remapped_preisaac "Remapped"
	label var low_ltv "Low LTV"

	esttab using "$repoutput/isaac_delinquency.txt", b(4) se(4) ar2(2) replace label  ///
		keep(1.post_isaac 1.low_ltv 1.remapped_preisaac ///
			1.post_isaac#1.low_ltv 1.post_isaac#1.remapped_preisaac 1.low_ltv#1.remapped_preisaac ///
			1.post_isaac#1.low_ltv#1.remapped_preisaac) ///
		star(* 0.10 ** 0.05 *** 0.01)   substitute(" 0" " " " .0000" " " "(.)" "") 


	